<template>
  <div class="tabs">
    <tab v-model:active="active" :list="tabList"></tab>
  </div>
</template>
<script>
import tab from './tab.vue'

export default {
  name: 'tabs',
  components: { tab },
  data () {
    return {
      active: '0',
      tabList: [{
        name: '库存负荷',
        id: '0'
      }, {
        name: '处置去向',
        id: '1'
      }, {
        name: '行业总废',
        id: '2'
      }]
    }
  },
  watch: {},
  mounted () {
  },
  methods: {

  }
}
</script>
<style scoped lang="scss">
.tabs {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  width: calc(100% - 40px);
  margin: 10px auto;

  .tab {
    width: 100px;
    height: 36px;
    background: url("./assets/tabbg.png") center center no-repeat;
    background-size: 100% 100%;
    opacity: 1;
    display: flex;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;

    span {
      font-size: 14px;
      font-family: PingFang SC-Medium, PingFang SC;
      font-weight: 500;
      color: #00B2FF;
    }

  }

  .tab.active {
    width: 100px;
    height: 36px;
    background: url("./assets/tabActiveBg.png") center center no-repeat;
    background-size: 100% 100%;
    opacity: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;

    span {
      font-size: 16px;
      font-family: PingFang SC-Bold, PingFang SC;
      font-weight: bold;
      color: #031B2F;
    }
  }
}
</style>
